From 567a5d737f104023d8a2dd1ab20d13d65c9514d5 Mon Sep 17 00:00:00 2001 From: Kan-Ru Chen Date: Sat, 17 Dec 2011 18:41:52 +0800 Subject: [PATCH] Enable hardening flags --- debian/changelog | 1 + debian/control | 2 +- debian/rules | 11 ++++------- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/debian/changelog b/debian/changelog index b7c8e99..bc88a0b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ opencc (0.3.0-1) unstable; urgency=low * New upstream release * Remove autotools-dev and quilt from Build-Depends * Support `nostrip' DEB_BUILD_OPTIONS + * Enable hardening flags. * debian/patches/fix-big-endian-build.diff: merged upstream * debian/patches/fix-new-test-cases.patch: New patch. diff --git a/debian/control b/debian/control index a6d5394..57e3303 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: opencc Priority: optional Maintainer: IME Packaging Team Uploaders: LI Daobing , Asias He -Build-Depends: debhelper (>= 7.0.50~), cmake +Build-Depends: debhelper (>= 7.0.50~), dpkg-dev (>= 1.16.1.1~), cmake Standards-Version: 3.9.2 Section: libs Homepage: http://code.google.com/p/opencc diff --git a/debian/rules b/debian/rules index c81f1fa..75ecb9a 100755 --- a/debian/rules +++ b/debian/rules @@ -1,13 +1,10 @@ #!/usr/bin/make -f - -ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS))) - BUILD_TYPE=Release -else - BUILD_TYPE=Debug -endif +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/buildflags.mk %: dh $@ override_dh_auto_configure: - dh_auto_configure -- -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_GETTEXT:BOOL=ON + dh_auto_configure -- -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DENABLE_GETTEXT:BOOL=ON -- 2.30.2